export default function ObjectMap (callback, flag) {
  let count = 0
  let array = []
  const arrayKey = Object.keys(this)
  for (let item of arrayKey) {
    if (flag) {
      array.push(callback(this[item], count++))
    } else {
      array.unshift(callback(this[item], count++))
    }

  }
  return array
}